package tsb.dominio.interfaces;

/**
 * @author Federico Gomez
 * @version 1.0
 * @created 12-Mar-2011 05:41:39 p.m.
 */
public class Ethernet extends InterfaceDeConeccion {

    private boolean duplex;
    private boolean detecionAutomaticaAnchoBnadaDuplex;
    private MAC mac;


    public Ethernet(){
        super();
    }

    public Ethernet(boolean estado, int anchoDeBanda, IP ip,IP subnetMask, boolean duplex, boolean detecionAutomaticaAnchoBnadaDuplex, MAC mac) {

        this.estado= estado;
        this.anchoDeBanda=anchoDeBanda;
        this.ip=ip;
        this.subnetMask=subnetMask;
        this.duplex = duplex;
        this.detecionAutomaticaAnchoBnadaDuplex = detecionAutomaticaAnchoBnadaDuplex;
        this.mac = mac;
    }

public String toString()
{
    String cad= "---- Interfaz Ethernet ----" +"\n"+
            super.toString() +
            "Duplex: "+ duplex +"\n"+
            "MAC: "+ mac.getMac() +"\n"+
            "Deteccion automatica duplex: " +detecionAutomaticaAnchoBnadaDuplex;

    return cad;
}

    public IP getIp() {
        return ip;
    }

    public void setIp(IP ip) {
        this.ip = ip;
    }

  
    public boolean isDetecionAutomaticaAnchoBnadaDuplex() {
        return detecionAutomaticaAnchoBnadaDuplex;
    }

    public void setDetecionAutomaticaAnchoBnadaDuplex(boolean detecionAutomaticaAnchoBnadaDuplex) {
        this.detecionAutomaticaAnchoBnadaDuplex = detecionAutomaticaAnchoBnadaDuplex;
    }

    public boolean isDuplex() {
        return duplex;
    }

    public void setDuplex(boolean duplex) {
        this.duplex = duplex;
    }

    public MAC getMac() {
        return mac;
    }

    public void setMac(MAC mac) {
        this.mac = mac;
    }




    


  

}